/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * SettingsDialog.java
 *
 * Created on 22-Jun-2010, 15:40:53
 */
package phd.dupenois.changeidentifiers.optimisation.singlepattern.frames;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.Iterator;
import java.util.Vector;
import java.util.jar.JarEntry;
import java.util.jar.JarInputStream;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JFileChooser;
import javax.swing.ListModel;
import javax.swing.event.ListDataEvent;
import javax.swing.event.ListDataListener;
import javax.swing.filechooser.FileFilter;
import phd.dupenois.changeidentifiers.footprints.algorithms.FootprintAlgorithm;
import phd.dupenois.changeidentifiers.optimisation.singlepattern.Application;

/**
 *
 * @author Max
 */
public class SettingsDialog extends javax.swing.JDialog {

    private class DotPatternFilter extends FileFilter {

        public boolean accept(File file) {
            if (file.isDirectory()) {
                return true;
            }
            if (file.getPath().toLowerCase().matches("^.*\\.csv$")) {
                return true;
            }
            return false;
        }

        @Override
        public String getDescription() {
            return "Comma-Separated Values (.csv)";
        }
    }

    private class AlgorithmFileFilter extends FileFilter {

        public boolean accept(File file) {
            if (file.isDirectory()) {
                return true;
            }
            if (file.getPath().toLowerCase().matches("^.*\\.jar$")) {
                return true;
            }
            return false;
        }

        @Override
        public String getDescription() {
            return "Java Package (.jar)";
        }
    }

    private class DotPatternListModel implements ListModel {

        private Vector<String> list;
        private Vector<ListDataListener> listDataListeners;

        public DotPatternListModel() {
            list = new Vector<String>();
            listDataListeners = new Vector<ListDataListener>();
        }

        public int getSize() {
            return list.size();
        }

        public boolean moveUp(String element) {
            return move(element, list.indexOf(element) - 1);
        }

        public boolean moveDown(String element) {
            return move(element, list.indexOf(element) + 1);
        }

        public boolean move(String element, int index) {
            if (index < 0 || index >= list.size()) {
                return false;
            }
            int originalIndex = list.indexOf(element);
            if (originalIndex == index) {
                return true;
            }
            list.remove(element);
            list.insertElementAt(element, index);
            if (originalIndex < index) {
                fireContentsChangedListener(originalIndex, index);
            } else {
                fireContentsChangedListener(index, originalIndex);
            }
            return true;
        }

        public int indexOf(String element) {
            return list.indexOf(element);
        }

        public String[] toArray() {
            return list.toArray(new String[list.size()]);
        }

        public Object getElementAt(int arg0) {
            if (arg0 >= 0 && arg0 < list.size()) {
                return list.get(arg0);
            }
            return null;
        }

        public void addElement(String element) {
            if (!list.contains(element)) {
                list.add(element);
            }
            fireContentsChangedListener(list.size() - 1, list.size() - 1);
        }

        public void removeElement(String element) {
            int index = list.indexOf(element);
            list.remove(element);
            fireContentsChangedListener(index, index);
        }

        public void fireContentsChangedListener(int index0, int index1) {
            ListDataListener[] arr = listDataListeners.toArray(
                    new ListDataListener[listDataListeners.size()]);
            for (ListDataListener ldl : arr) {
                ldl.contentsChanged(new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED, index0, index1));
            }
        }

        public void addListDataListener(ListDataListener arg0) {
            listDataListeners.add(arg0);
        }

        public void removeListDataListener(ListDataListener arg0) {
            listDataListeners.remove(arg0);
        }
    }
    private JFileChooser dotPatternChooser;
    private DotPatternListModel dotPatternListModel;
    private Vector<Class<? extends FootprintAlgorithm>> algorithmClasses;
    private JFileChooser algorithmFileChooser;
    private DefaultComboBoxModel algorithmClassModel;

    /** Creates new form SettingsDialog */
    public SettingsDialog(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        boolean onSecam = false;
        if (new File("/olib1/ecs_ug/cspg/mpd209/").isDirectory()) {
            onSecam = true;
        }
        dotPatternChooser = new JFileChooser();
        dotPatternChooser.setMultiSelectionEnabled(true);
        dotPatternChooser.setFileFilter(new DotPatternFilter());
        dotPatternChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
        if (onSecam) {
            dotPatternChooser.setCurrentDirectory(new File("/olib1/ecs_ug/cspg/mpd209/dot_pattern_stream/"));
        } else {
            dotPatternChooser.setCurrentDirectory(new File("C:\\Users\\Max\\Documents\\dot_pattern_stream"));
        }
        dotPatternListModel = new DotPatternListModel();
        loadDotPatternStreamList.setModel(dotPatternListModel);

        algorithmFileChooser = new JFileChooser();
        algorithmFileChooser.setMultiSelectionEnabled(false);
        algorithmFileChooser.setFileFilter(new AlgorithmFileFilter());
        algorithmFileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
        if (onSecam) {
            algorithmFileChooser.setCurrentDirectory(new File("/olib1/ecs_ug/cspg/mpd209/NetBeansProjects/ChangeIdentifierProjects/FootprintAlgorithmProjects/"));
        } else {
            algorithmFileChooser.setCurrentDirectory(new File("C:\\Users\\max\\Development\\Java\\ChangeIdentifierProjects\\FootprintAlgorithmProjects"));
        }
        algorithmClassModel = new DefaultComboBoxModel();
        loadAlgorithmClassComboBox.setModel(algorithmClassModel);

        algorithmClasses = new Vector<Class<? extends FootprintAlgorithm>>();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        loadDotPatternStreamPanel = new javax.swing.JPanel();
        loadDotPatternStreamDisplayPanel = new javax.swing.JPanel();
        loadDotPatternStreamListPanel = new javax.swing.JPanel();
        loadDotPatternStreamScrollPane = new javax.swing.JScrollPane();
        loadDotPatternStreamList = new javax.swing.JList();
        loadDotPatternStreamListButtons = new javax.swing.JPanel();
        loadDotPatternStreamAddButton = new javax.swing.JButton();
        loadDotPatternStreamListUpButton = new javax.swing.JButton();
        loadDotPatternStreamListDownButton = new javax.swing.JButton();
        loadDotPatternStreamListRemoveButton = new javax.swing.JButton();
        loadAlgorithmPanel = new javax.swing.JPanel();
        loadAlgorithmJarLocation = new javax.swing.JPanel();
        loadAlgorithmTextField = new javax.swing.JTextField();
        loadAlgorithmBrowseButton = new javax.swing.JButton();
        loadAlgorithmClassName = new javax.swing.JPanel();
        loadAlgorithmClassComboBox = new javax.swing.JComboBox();
        acceptPanel = new javax.swing.JPanel();
        acceptButtonFillerPanel = new javax.swing.JPanel();
        errorMessageLabel = new javax.swing.JLabel();
        acceptButton = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        getContentPane().setLayout(new java.awt.GridBagLayout());

        loadDotPatternStreamPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Dot Pattern Stream"));
        loadDotPatternStreamPanel.setLayout(new java.awt.BorderLayout());

        loadDotPatternStreamDisplayPanel.setLayout(new java.awt.GridBagLayout());

        loadDotPatternStreamListPanel.setLayout(new java.awt.GridLayout(1, 0));

        loadDotPatternStreamScrollPane.setViewportView(loadDotPatternStreamList);

        loadDotPatternStreamListPanel.add(loadDotPatternStreamScrollPane);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        loadDotPatternStreamDisplayPanel.add(loadDotPatternStreamListPanel, gridBagConstraints);

        loadDotPatternStreamListButtons.setLayout(new java.awt.GridLayout(1, 0));

        loadDotPatternStreamAddButton.setText("Add");
        loadDotPatternStreamAddButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                loadDotPatternStreamAddButtonActionPerformed(evt);
            }
        });
        loadDotPatternStreamListButtons.add(loadDotPatternStreamAddButton);

        loadDotPatternStreamListUpButton.setText("Up");
        loadDotPatternStreamListUpButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                loadDotPatternStreamListUpButtonActionPerformed(evt);
            }
        });
        loadDotPatternStreamListButtons.add(loadDotPatternStreamListUpButton);

        loadDotPatternStreamListDownButton.setText("Down");
        loadDotPatternStreamListDownButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                loadDotPatternStreamListDownButtonActionPerformed(evt);
            }
        });
        loadDotPatternStreamListButtons.add(loadDotPatternStreamListDownButton);

        loadDotPatternStreamListRemoveButton.setText("Remove");
        loadDotPatternStreamListRemoveButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                loadDotPatternStreamListRemoveButtonActionPerformed(evt);
            }
        });
        loadDotPatternStreamListButtons.add(loadDotPatternStreamListRemoveButton);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST;
        gridBagConstraints.weightx = 1.0;
        loadDotPatternStreamDisplayPanel.add(loadDotPatternStreamListButtons, gridBagConstraints);

        loadDotPatternStreamPanel.add(loadDotPatternStreamDisplayPanel, java.awt.BorderLayout.CENTER);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        getContentPane().add(loadDotPatternStreamPanel, gridBagConstraints);

        loadAlgorithmPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Algorithm"));
        loadAlgorithmPanel.setLayout(new java.awt.GridLayout(0, 1));

        loadAlgorithmJarLocation.setLayout(new javax.swing.BoxLayout(loadAlgorithmJarLocation, javax.swing.BoxLayout.LINE_AXIS));

        loadAlgorithmTextField.setEditable(false);
        loadAlgorithmJarLocation.add(loadAlgorithmTextField);

        loadAlgorithmBrowseButton.setText("Browse");
        loadAlgorithmBrowseButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                loadAlgorithmBrowseButtonActionPerformed(evt);
            }
        });
        loadAlgorithmJarLocation.add(loadAlgorithmBrowseButton);

        loadAlgorithmPanel.add(loadAlgorithmJarLocation);

        loadAlgorithmClassName.setLayout(new java.awt.GridLayout(1, 0));
        loadAlgorithmClassName.add(loadAlgorithmClassComboBox);

        loadAlgorithmPanel.add(loadAlgorithmClassName);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.weightx = 1.0;
        getContentPane().add(loadAlgorithmPanel, gridBagConstraints);

        acceptPanel.setLayout(new java.awt.GridBagLayout());

        acceptButtonFillerPanel.setLayout(new java.awt.GridBagLayout());

        errorMessageLabel.setFont(new java.awt.Font("DejaVu LGC Sans", 1, 13));
        errorMessageLabel.setForeground(new java.awt.Color(153, 0, 0));
        errorMessageLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 5;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        acceptButtonFillerPanel.add(errorMessageLabel, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.RELATIVE;
        gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.weightx = 1.0;
        acceptPanel.add(acceptButtonFillerPanel, gridBagConstraints);

        acceptButton.setFont(new java.awt.Font("DejaVu LGC Sans", 1, 13));
        acceptButton.setText("Begin Run");
        acceptButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                acceptButtonActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.ipadx = 5;
        gridBagConstraints.ipady = 5;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        acceptPanel.add(acceptButton, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST;
        gridBagConstraints.weightx = 1.0;
        getContentPane().add(acceptPanel, gridBagConstraints);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void loadDotPatternStreamAddButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loadDotPatternStreamAddButtonActionPerformed
        int returnVal = dotPatternChooser.showOpenDialog(this);
        if (returnVal == JFileChooser.APPROVE_OPTION) {
            File[] files = dotPatternChooser.getSelectedFiles();
            for (File file : files) {
                if (file.isDirectory()) {
                    File[] children = file.listFiles(new java.io.FileFilter() {

                        public boolean accept(File arg0) {
                            return dotPatternChooser.getFileFilter().accept(arg0);
                        }
                    });
                    for (File c : children) {
                        if (!c.isDirectory()) {
                            dotPatternListModel.addElement(c.getAbsolutePath());
                        }
                    }
                } else {
                    dotPatternListModel.addElement(file.getAbsolutePath());
                }
            }
        }
}//GEN-LAST:event_loadDotPatternStreamAddButtonActionPerformed

    private void loadDotPatternStreamListUpButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loadDotPatternStreamListUpButtonActionPerformed
        Object[] selection = loadDotPatternStreamList.getSelectedValues();
        boolean moveable = true;
        int[] indices = new int[selection.length];
        for (int i = 0; i < selection.length && moveable; i++) {
            moveable = dotPatternListModel.moveUp((String) selection[i]);
        }
        for (int i = 0; i < selection.length; i++) {
            indices[i] = dotPatternListModel.indexOf((String) selection[i]);
        }
        loadDotPatternStreamList.setSelectedIndices(indices);
}//GEN-LAST:event_loadDotPatternStreamListUpButtonActionPerformed

    private void loadDotPatternStreamListDownButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loadDotPatternStreamListDownButtonActionPerformed
        Object[] selection = loadDotPatternStreamList.getSelectedValues();
        boolean moveable = true;
        int[] indices = new int[selection.length];
        for (int i = selection.length - 1; i >= 0 && moveable; i--) {
            moveable = dotPatternListModel.moveDown((String) selection[i]);
        }
        for (int i = selection.length - 1; i >= 0; i--) {
            indices[i] = dotPatternListModel.indexOf((String) selection[i]);
        }
        loadDotPatternStreamList.setSelectedIndices(indices);
}//GEN-LAST:event_loadDotPatternStreamListDownButtonActionPerformed

    private void loadDotPatternStreamListRemoveButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loadDotPatternStreamListRemoveButtonActionPerformed
        Object[] selection = loadDotPatternStreamList.getSelectedValues();
        for (Object s : selection) {
            dotPatternListModel.removeElement((String) s);
        }
}//GEN-LAST:event_loadDotPatternStreamListRemoveButtonActionPerformed
    public String[] getDotPatternStream() {
        return dotPatternListModel.toArray();
    }

    private boolean valid() {
        if(getAlgorithmClass()==null){
            setError("No algorithm class chosen");
            return false;
        }
        if (getDotPatternStream().length < 2) {
            setError("Not enough dot patterns chosen, at least 2 required");
            return false;
        }
        return true;
    }

    private void setError(String error) {
        errorMessageLabel.setText(error);
    }
    private void acceptButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_acceptButtonActionPerformed
        if (valid()) {
            this.dispose();
        }
}//GEN-LAST:event_acceptButtonActionPerformed

    private void loadAlgorithmBrowseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loadAlgorithmBrowseButtonActionPerformed
        int returnVal = algorithmFileChooser.showOpenDialog(this);
        if (returnVal == JFileChooser.APPROVE_OPTION) {
            loadAlgorithmTextField.setText(algorithmFileChooser.getSelectedFile().getAbsolutePath());
        }
        algorithmClasses.clear();
        algorithmClassModel.removeAllElements();
        if (!loadAlgorithmTextField.getText().trim().equals("")) {
            setClassList();
        }
}//GEN-LAST:event_loadAlgorithmBrowseButtonActionPerformed
    private void setClassList() {
        try {
            JarInputStream jarFile = new JarInputStream(new FileInputStream(loadAlgorithmTextField.getText()));
            JarEntry jarEntry = jarFile.getNextJarEntry();
            Vector<String> classnames = new Vector<String>();
            String classname;
            String urlPath = "jar:file:///" + loadAlgorithmTextField.getText() + "!/";
            URLClassLoader classLoader = new URLClassLoader(new URL[]{new URL(urlPath)});
            while (jarEntry != null) {
                if ((jarEntry.getName().endsWith(".class"))) {
                    classname = jarEntry.getName().replaceAll("/", "\\.");
                    classname = classname.substring(0, classname.length() - 6);
                    Class<? extends FootprintAlgorithm> footprintClass = Application.getFootprintAlgorithmClass(classLoader, classname);
                    if (footprintClass != null) {
                        classnames.add(classname);
                        algorithmClasses.add(footprintClass);
                    }
                }
                jarEntry = jarFile.getNextJarEntry();
            }
            if (classnames.isEmpty()) {
                setError("No Footprint Algorithms found in given jar");
            } else {
                for (String cn : classnames) {
                    algorithmClassModel.addElement(cn);
                }
            }
        } catch (IOException iOException) {
            setError(iOException.getMessage());
        } catch (ClassNotFoundException classNotFoundException) {
            setError(classNotFoundException.getMessage());
        }
    }


    public Class<? extends FootprintAlgorithm> getAlgorithmClass() {
        Class<? extends FootprintAlgorithm> algClass = null;
        Iterator<Class<? extends FootprintAlgorithm>> iter = algorithmClasses.iterator();
        while(algClass==null&&iter.hasNext()){
            Class<? extends FootprintAlgorithm> c = iter.next();
            if(c.getCanonicalName().equals((String)loadAlgorithmClassComboBox.getSelectedItem())){
                algClass = c;
            }
        }
        return algClass;
    }
    /**
     * @param args the command line arguments
     */
//    public static void main(String args[]) {
//        java.awt.EventQueue.invokeLater(new Runnable() {
//            public void run() {
//                SettingsDialog dialog = new SettingsDialog(new javax.swing.JFrame(), true);
//                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
//                    public void windowClosing(java.awt.event.WindowEvent e) {
//                        System.exit(0);
//                    }
//                });
//                dialog.setVisible(true);
//            }
//        });
//    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton acceptButton;
    private javax.swing.JPanel acceptButtonFillerPanel;
    private javax.swing.JPanel acceptPanel;
    private javax.swing.JLabel errorMessageLabel;
    private javax.swing.JButton loadAlgorithmBrowseButton;
    private javax.swing.JComboBox loadAlgorithmClassComboBox;
    private javax.swing.JPanel loadAlgorithmClassName;
    private javax.swing.JPanel loadAlgorithmJarLocation;
    private javax.swing.JPanel loadAlgorithmPanel;
    private javax.swing.JTextField loadAlgorithmTextField;
    private javax.swing.JButton loadDotPatternStreamAddButton;
    private javax.swing.JPanel loadDotPatternStreamDisplayPanel;
    private javax.swing.JList loadDotPatternStreamList;
    private javax.swing.JPanel loadDotPatternStreamListButtons;
    private javax.swing.JButton loadDotPatternStreamListDownButton;
    private javax.swing.JPanel loadDotPatternStreamListPanel;
    private javax.swing.JButton loadDotPatternStreamListRemoveButton;
    private javax.swing.JButton loadDotPatternStreamListUpButton;
    private javax.swing.JPanel loadDotPatternStreamPanel;
    private javax.swing.JScrollPane loadDotPatternStreamScrollPane;
    // End of variables declaration//GEN-END:variables
}
